package Program;

import java.util.Scanner;

public class Case1 {
    //买飞机票

    public static void main(String[] sqrs)
    {
        double first_class = 0;
        double economy_class = 0;
        int month = 0;
        System.out.println("请输入月份");
        Scanner sc = new Scanner(System.in);
        month = sc.nextInt();
        System.out.println("请输入票价");
        double price = sc.nextDouble();
        if(month >= 5 && month <= 10)
        {
            first_class = 0.9;
            economy_class = 0.85;
        }
        else
        {
            first_class = 0.7;
            economy_class = 0.65;
        }
        double cost1 = first_class * price;
        double cost2 = economy_class * price;
        System.out.println("头等舱价格为" + cost1);
        System.out.println("经济舱价格为" + cost2);
    }
}
